//
//  ZView.m
//  ZPlayer
//
//  Created by Zed Link on 26/11/2016.
//  Copyright © 2016 ZED. All rights reserved.
//

#import "ZView.h"

@implementation ZView

+ (instancetype)xibInstance
{
     ZView *view = [[UINib nibWithNibName:NSStringFromClass(self.class) bundle:nil] instantiateWithOwner:nil options:nil].lastObject;
    NSAssert([view isKindOfClass:[ZView class]], @"从同名的Xib文件加载的视图并非ZView的子类");
    
    return view;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self zInitPrepare];
    }
    return self;
}

- (void)awakeFromNib
{
    [super awakeFromNib];
    
    [self zInitPrepare];
}

- (void)zInitPrepare
{

}

@end
